package com.example.AppGoogleMapsV2;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		setupMessageButton();
		setupMusicButton();
	}

	private void setupMessageButton() {
	Button button = (Button) findViewById(R.id.btnDisplayMessage);
	button.setOnClickListener(new OnClickListener() {
	   @Override
	   public void onClick(View v) {
		   
		   startActivity(new Intent(MainActivity.this, SecondActivity.class));	   
	 }
	});
   }
	
	private void setupMusicButton() {
		Button button = (Button) findViewById(R.id.btnPlayMusic);
		button.setOnClickListener(new OnClickListener() {
		   @Override
		   public void onClick(View v) {
			   
			   startActivity(new Intent(MainActivity.this, MusicActivity.class));	   
		 }
		});
	   }
		
	
    @Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
}



